// sis puella oier
#include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
ll read(){
    ll xx = 0, f = 1; char ch = getchar();
    for (;!isdigit(ch); ch = getchar())f = (ch == '-' ? -1 : 1);
    for (; isdigit(ch); ch = getchar())xx = xx * 10 + ch - '0';
    return xx * f;
}
const int N = 100100;
int n, a[N], f[N];
signed main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    n = read(); for (int i = 1; i <= n; ++i)a[i] = read();
    sort(a + 1, a + n + 1);
    f[1] = 1;
    for (int i = 2; i <= n; ++i){
        if (a[i] > a[i - 1 - f[i - 1] + 1])f[i] = f[i - 1];
        else f[i] = f[i - 1] + 1;
    }
    printf("%d\n", f[n]);
    return 0;
}

